package com.welfare.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.welfare.dao.WelfareRecordRepository;
import com.welfare.entity.WelfareRecord;

@Service
@Transactional
public class WelfareRecordService implements IWelfareRecordService {

	@Autowired
	private WelfareRecordRepository welfareRecordDao;
	
	public void saveOrUpdate(com.welfare.entity.WelfareRecord welfareRecord) {
		welfareRecordDao.save(welfareRecord);
	}

	public void delete(com.welfare.entity.WelfareRecord welfareRecord) {
	}

	public void delete(List<Long> ids) {
	}

	public void deleteSelf(com.welfare.entity.WelfareRecord welfareRecord) {
	}

	public WelfareRecord findOne(Long id) {
		return welfareRecordDao.findOne(id);
	}

	public List<WelfareRecord> findAll() {
		return (List<WelfareRecord>) welfareRecordDao.findAll();
	}

	public Page<com.welfare.entity.WelfareRecord> findAll(Specification<com.welfare.entity.WelfareRecord> spec,
			Pageable pageable) {
		return welfareRecordDao.findAll(spec, pageable);
	}
}
